﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPageMain.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<estudent.Models.sPredmeti>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Predmeti
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="InnerRightContent" runat="server">

    <h1>Vsi predmeti</h1>

    <table border="1" cellpadding="0" cellspacing="0">
        <tr>
            <th></th>
            <th>
                Šifra
            </th>

            <th>
                Ime
            </th>

            <th>
                Kreditne točke
            </th>

            <th>
                Veljaven
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr align="center">
            <td>
                <%: Html.ActionLink("Uredi", "Edit", new { id=item.sPredmeta }) %> |
                <%: Html.ActionLink("Spremeni veljavnost", "Delete", new { id=item.sPredmeta })%>
            </td>
            <td>
                <%: item.sPredmeta %>
            </td>

            <td>
                <%: item.imePredmeta %>
            </td>

            <td>
                <%: item.stKreditnih %>
            </td>

             <td>
                <%: (item.veljaven==null||item.veljaven==true)? "" : "Neveljaven" %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("DODAJ NOV PREDMET", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="JQueryContent" runat="server">
</asp:Content>

